// 组件的配置参数
export const componentsList = {
  // 空
  default: {
    id: '',
    // 组件的名称
    name: '',
    // 值
    value: '',
    // 样式配置
    style: {},
    // 数据显示
    config: {},
    // 校验
    valid: {},
    // 数据源绑定
    databinding: '',
    // 位置信息
    location: {},
    // 事件绑定
    event: {},
    // 组件类型
    componentType: 0
  },

  // 文本类
  text: {
    name: 'textItem',
    style: {
      fontFamily: 'Microsoft Yahei',
      fontSize: '14px',
      color: '#333333',
      backgroundColor: '#ffffff',
      fontWeight: 'normal',
      fontStyle: 'normal',
      textDecoration: 'none',
      textAlign: 'left',
      borderWidth: 0,
      borderColor: '',
      borderStyle: 'solid',
      lineHeight: '30px',
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px',
      paddingLeft: '0px',
      paddingRight: '0px',
      paddingTop: '0px',
      paddingBottom: '0px'
    },
    config: {
      content: 'AInote 运营管理系统',
      fixWidth: false,
      fixHeight: false
    },
    valid: null
  },

  // 输入框
  input: {
    name: 'inputItem',
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    config: {
      labelName: '输入框：',
      labelWidth: '60px',
      type: 'text',
      rows: 2,
      size: 'default',
      placeholder: '请输入',
      disabled: false,
      maxlength: null,
      height: '32px'
    }
  },

  // 选择框
  select: {
    name: 'selectItem',
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    config: {
      labelName: '选择框：',
      labelWidth: '60px',
      size: 'default',
      placeholder: '请选择',
      disabled: false,
      multiple: false,
      options: [
        {
          value: 'apple',
          label: 'apple'
        }
      ]
    }
  },

  // 开关
  switch: {
    name: 'switchItem',
    value: false,
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    location: {
      w: 6
    },
    config: {
      labelName: '开关：',
      labelWidth: '60px',
      size: 'default',
      disabled: false,
      trueValue: '开',
      falseValue: '关'
    }
  },

  // 日期
  datepicker: {
    name: 'datepickerItem',
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    config: {
      labelName: '日期：',
      labelWidth: '60px',
      type: 'date',
      format: 'yyyy-MM-dd',
      size: 'default',
      placeholder: '请输入日期',
      disabled: false
    }
  },

  // 按钮
  button: {
    name: 'buttonItem',
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    location: {
      w: 6
    },
    config: {
      title: '按钮',
      type: 'primary',
      size: 'default',
      customIcon: '',
      to: '',
      target: '_self',
      disabled: false,
      ghost: false,
      long: false
    },
    valid: null,
    databinding: null
  },

  // 复选框
  checkbox: {
    name: 'checkboxItem',
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    value: false,
    config: {
      labelName: '复选框：',
      labelWidth: '60px',
      label: '复选框',
      size: 'default',
      disabled: false
    }
  },

  // 复选框
  checkboxgroup: {
    name: 'checkboxgroupItem',
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    value: [],
    config: {
      labelName: '多选组合：',
      labelWidth: '80px',
      size: 'default',
      disabled: false,
      border: false,
      options: [
        {
          value: 'apple',
          label: 'apple'
        },
        {
          value: 'orange',
          label: 'orange'
        }
      ],
      marginRight: 8
    }
  },

  // 单选
  radio: {
    name: 'radioItem',
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    value: false,
    config: {
      labelName: '单选框：',
      labelWidth: '60px',
      label: '单选框',
      size: 'default',
      disabled: false
    }
  },

  // 单选组合
  radiogroup: {
    name: 'radiogroupItem',
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    value: [],
    config: {
      labelName: '单选组合：',
      labelWidth: '80px',
      size: 'default',
      disabled: false,
      border: false,
      options: [
        {
          value: 'apple',
          label: 'apple'
        },
        {
          value: 'orange',
          label: 'orange'
        }
      ],
      marginRight: 8
    }
  },

  // 评分
  rate: {
    name: 'rateItem',
    style: {
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px'
    },
    value: 5,
    config: {
      labelName: '评分：',
      labelWidth: '60px',
      count: 5,
      allowHalf: false,
      showText: false,
      clearable: false,
      character: '',
      customicon: ''
    },
    databinding: null
  },

  // 表格
  table: {
    name: 'tableItem',
    location: {
      w: 24,
      h: 4
    },
    config: {
      stripe: false,
      border: false,
      highlightRow: false,
      size: 'default',
      columns: [
        {
          title: 'Name',
          key: 'name'
        },
        {
          title: 'Age',
          key: 'age'
        },
        {
          title: 'Address',
          key: 'address'
        }
      ],
      data: [
        {
          name: 'John Brown',
          age: 18,
          address: 'New York No. 1 Lake Park'
        },
        {
          name: 'Jim Green',
          age: 24,
          address: 'London No. 1 Lake Park'
        }
      ]
    }
  },

  // 段落
  section: {
    componentType: 1,
    databinding: null,
    name: 'sectionItem',
    location: {
      w: 12,
      h: 8
    },
    style: {
      fontFamily: 'Microsoft Yahei',
      fontSize: '14px',
      color: '#333333',
      backgroundColor: '#ffffff',
      fontWeight: 'normal',
      fontStyle: 'normal',
      textDecoration: 'none',
      textAlign: 'left',
      borderWidth: 0,
      borderColor: '',
      borderStyle: 'solid',
      lineHeight: '30px',
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px',
      paddingLeft: '0px',
      paddingRight: '0px',
      paddingTop: '0px',
      paddingBottom: '0px'
    },
    config: {
      mode: 'normal',
      switchSource: null, // 切换题的数据源
      switchData: [
        {
          content:
            "001-Hooray! It's snowing! It's time to make a snowman.James runs out. He makes a big pile of snow. He puts a big snowball on top. He adds a scarf and a hat. He adds an orange for the nose. He adds coal for the eyes and buttons.In the evening, James opens the door. What does he see? The snowman is moving! James invites him in. The snowman has never been inside a house. He says hello to the cat. He plays with paper towels.A moment later, the snowman takes James's hand and goes out.They go up, up, up into the air! They are flying! What a wonderful night!The next morning, James jumps out of bed. He runs to the door.He wants to thank the snowman. But he's gone."
        },
        {
          content:
            "002-Hooray! It's snowing! It's time to make a snowman.James runs out. He makes a big pile of snow. He puts a big snowball on top. He adds a scarf and a hat. He adds an orange for the nose. He adds coal for the eyes and buttons.In the evening, James opens the door. What does he see? The snowman is moving! James invites him in. The snowman has never been inside a house. He says hello to the cat. He plays with paper towels.A moment later, the snowman takes James's hand and goes out.They go up, up, up into the air! They are flying! What a wonderful night!The next morning, James jumps out of bed. He runs to the door.He wants to thank the snowman. But he's gone."
        },
        {
          content:
            "003-Hooray! It's snowing! It's time to make a snowman.James runs out. He makes a big pile of snow. He puts a big snowball on top. He adds a scarf and a hat. He adds an orange for the nose. He adds coal for the eyes and buttons.In the evening, James opens the door. What does he see? The snowman is moving! James invites him in. The snowman has never been inside a house. He says hello to the cat. He plays with paper towels.A moment later, the snowman takes James's hand and goes out.They go up, up, up into the air! They are flying! What a wonderful night!The next morning, James jumps out of bed. He runs to the door.He wants to thank the snowman. But he's gone."
        }
      ], // 切题模式下的数据
      prevText: '上一题',
      nextText: '下一题',
      checkedId: '',
      showTag: true,
      tagType: 'success',
      tagName: '标签',
      tagSource: null,
      showTitle: true,
      title: '这里是文本的标题',
      titleSource: null,
      content: '文本片段',
      contentSource: null
    }
  },

  // 划线
  delimit: {
    name: 'delimitItem',
    componentType: 1,
    databinding: null,
    location: {
      w: 24,
      h: 10
    },
    style: {
      fontFamily: 'Microsoft Yahei',
      fontSize: '14px',
      color: '#333333',
      backgroundColor: '#ffffff',
      fontWeight: 'normal',
      fontStyle: 'normal',
      textDecoration: 'none',
      textAlign: 'left',
      borderWidth: 0,
      borderColor: '',
      borderStyle: 'solid',
      lineHeight: '30px',
      marginLeft: '0px',
      marginRight: '0px',
      marginTop: '0px',
      marginBottom: '0px',
      paddingLeft: '0px',
      paddingRight: '0px',
      paddingTop: '0px',
      paddingBottom: '0px'
    },
    config: {
      title: '选中文本添加错误',
      content:
        'Currently , there is a widespread belief that the workers are not satisfied when thaey have many different types of tasks to do during the workday tham when they do similar tasks all day long .',
      contentSource: null,
      // labelOptions: [
      //   {
      //     value: '错误',
      //     label: 'error'
      //   },
      //   {
      //     value: '错误类型',
      //     label: 'type'
      //   },
      //   {
      //     value: '修改内容',
      //     label: 'correction'
      //   }
      // ],
      selectSource: null
    },
    valid: null
  }
}
